// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * DirectoryCountryRegion generated by hbm2java
 */
@Entity
@Table(name = "directory_country_region", catalog = "magento")
public class DirectoryCountryRegion implements java.io.Serializable {

	private Integer regionId;
	private String countryId;
	private String code;
	private String defaultName;
	private Set directoryCountryRegionNames = new HashSet(0);

	public DirectoryCountryRegion() {
	}

	public DirectoryCountryRegion(String countryId, String code) {
		this.countryId = countryId;
		this.code = code;
	}

	public DirectoryCountryRegion(String countryId, String code,
			String defaultName, Set directoryCountryRegionNames) {
		this.countryId = countryId;
		this.code = code;
		this.defaultName = defaultName;
		this.directoryCountryRegionNames = directoryCountryRegionNames;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "region_id", unique = true, nullable = false)
	public Integer getRegionId() {
		return this.regionId;
	}

	public void setRegionId(Integer regionId) {
		this.regionId = regionId;
	}

	@Column(name = "country_id", nullable = false, length = 4)
	public String getCountryId() {
		return this.countryId;
	}

	public void setCountryId(String countryId) {
		this.countryId = countryId;
	}

	@Column(name = "code", nullable = false, length = 32)
	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	@Column(name = "default_name")
	public String getDefaultName() {
		return this.defaultName;
	}

	public void setDefaultName(String defaultName) {
		this.defaultName = defaultName;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "directoryCountryRegion")
	public Set getDirectoryCountryRegionNames() {
		return this.directoryCountryRegionNames;
	}

	public void setDirectoryCountryRegionNames(Set directoryCountryRegionNames) {
		this.directoryCountryRegionNames = directoryCountryRegionNames;
	}

}
